<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:78:"D:\wwwroot\fangcms_city_add\public/../application/manage\view\estate\edit.html";i:1493950982;s:80:"D:\wwwroot\fangcms_city_add\public/../application/manage\view\public\header.html";i:1490355172;s:80:"D:\wwwroot\fangcms_city_add\public/../application/manage\view\public\footer.html";i:1474280020;}*/ ?>
<!doctype html>
<html>
<head>
	<meta charset="utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<link href="__CSS__/style.css" rel="stylesheet"/>
	<title>管理中心</title>

</head>

<body>
<div id="J_ajax_loading" class="ajax_loading">加载中...</div>

<div class="subnav">
    <div class="content_menu ib_a blue line_x">
        <?php if(!empty($sub_menu) OR !empty($big_menu)): if(!(empty($big_menu) || (($big_menu instanceof \think\Collection || $big_menu instanceof \think\Paginator ) && $big_menu->isEmpty()))): if(isset($normal)): ?>
        <a class="add fb" href="<?php echo $big_menu['iframe']; ?>"><em><?php echo $big_menu['title']; ?></em></a>
        <?php else: ?>
    	<a class="add fb J_showdialog" href="javascript:void(0);" data-uri="<?php echo $big_menu['iframe']; ?>" data-title="<?php echo $big_menu['title']; ?>" data-id="<?php echo $big_menu['id']; ?>" data-width="<?php echo $big_menu['width']; ?>" data-height="<?php echo $big_menu['height']; ?>"><em><?php echo $big_menu['title']; ?></em></a>
        <?php endif; endif; if(!(empty($sub_menu) || (($sub_menu instanceof \think\Collection || $sub_menu instanceof \think\Paginator ) && $sub_menu->isEmpty()))): if(is_array($sub_menu) || $sub_menu instanceof \think\Collection || $sub_menu instanceof \think\Paginator): $key = 0; $__LIST__ = $sub_menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($key % 2 );++$key;if($key != 1): ?><span>|</span><?php endif; ?>
        <a href="<?php echo $val['url']; ?>" class="<?php echo $val['class']; ?>"><em><?php echo $val['name']; ?></em></a>
        <?php endforeach; endif; else: echo "" ;endif; endif; endif; ?>
    </div>
</div>

<!--编辑小区-->
<form id="info_form" action="<?php echo url('editDo'); ?>" method="post" enctype="multipart/form-data">
<div class="pad_lr_10">
	<div class="col_tab">
		<ul class="J_tabs tab_but cu_li">
            <li class="current">基本信息</li>
            <li>基础数据</li>
            <li>SEO设置</li>
		</ul>
		<div class="J_panes">
			<div class="content_list pad_10">
				<table width="100%" cellspacing="0" class="table_form">
                    <tr>
                        <th width="120">所属区域 :</th>
                        <td>
                            <select class="J_cate_select mr10" data-pid="0" data-menuid="1" data-uri="<?php echo url('City/ajaxGetchilds'); ?>" data-selected="<?php echo $info['city']; ?>|<?php echo $info['area']; ?>"></select>
                            <input type="hidden" name="area" id="J_cate_id" value="" />
                        </td>
                    </tr>
		            <tr>
						<th>小区名称 :</th>
						<td>
							<input type="text" name="title" id="J_title" value="<?php echo $info['title']; ?>" class="input-text" size="40">
					       </td>
					</tr>
                    <tr>
                        <th>建筑年代 :</th>
                        <td><input type="text" name="niandai" id="niandai" value="<?php echo $info['niandai']; ?>" class="input-text" size="10" />年</td>
                    </tr>
                    <tr>
                        <th>小区类型 :</th>
                        <td><?php echo getLinkMenu(7,'estate_type','checkbox',explode(',',$info['estate_type'])); ?></td>
                    </tr>

                    <tr>
                        <th>地图标注：</th>
                        <td>
                            <input type="text" name="map" id="map" class="input-text" size="27" value="<?php echo $info['lng']; ?>,<?php echo $info['lat']; ?>"/>
                            &nbsp;&nbsp;<a href="http://api.map.baidu.com/lbsapi/getpoint/" style="padding: 8px;color:#ffffff;background: #008000" target="_blank">获取百度地图坐标</a>
                        </td>
                    </tr>

                    <tr>
                        <th>小区地址 :</th>
                        <td><input type="text" name="address" value="<?php echo $info['address']; ?>" id="address" class="input-text" size="40"/> </td>
                    </tr>

		            <tr>
						<th>缩略图:</th>
						<td>
                            <?php if(!(empty($info['img']) || (($info['img'] instanceof \think\Collection || $info['img'] instanceof \think\Paginator ) && $info['img']->isEmpty()))): ?>
                            <img src="<?php echo $info['img']; ?>" alt="" width="150" /><br />
                            <?php endif; ?>
                            <input type="file" name="img" id="img" class="input-text"  style="width:200px;" /> 图片尺寸：310*200</td>
		 			</tr>
                    <tr>
                        <th>小区图片 :</th>
                        <td><script id="uploadpic" name="uploadpic" type="text/plain"></script>
                            <input type="button" class="btn btn_submit" style="margin:0 0 10px 10px;" onclick="upImage();" value="选择图片">
                            <div id="imageList">
                                <ul class="list clearfix">
                                    <?php if(is_array($info['file']) || $info['file'] instanceof \think\Collection || $info['file'] instanceof \think\Paginator): $i = 0; $__LIST__ = $info['file'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                                    <li>
                                        <img width="113" height="113" alt="<?php echo $vo['title']; ?>" src="<?php echo $vo['url']; ?>">
                                        <input type="hidden" value="<?php echo $vo['url']; ?>" name="pic[pic][]">
                                        <input type="text" class="imgtitletxt" value="<?php echo $vo['title']; ?>" name="pic[alt][]">
                                        <div class="delbox"><span class="del">删除</span></div>
                                    </li>
                                    <?php endforeach; endif; else: echo "" ;endif; ?>
                                </ul>
                            </div>
                        </td>
                    </tr>

					<tr>
						<th>状态 :</th>
                        <td>
                            <label><input type="radio" name="status" class="radio_style" value="1" <?php if($info['status'] == 1): ?>checked="checked"<?php endif; ?>> 启用 </label>&nbsp;&nbsp;
                            <label><input type="radio" name="status" class="radio_style" value="0" <?php if($info['status'] == 0): ?>checked="checked"<?php endif; ?>>禁用</label>
                        </td>
					</tr>
                    <tr>
                        <th>介绍 :</th>
                        <td>
                            <script id="info" name="data[info]" type="text/plain"><?php echo $detail['info']; ?></script>
                        </td>
                    </tr>
				</table>
			</div>
            <div class="content_list pad_10 hidden">
                <table width="100%" cellspacing="0" class="table_form">
                    <tr>
                        <th>小区概况 :</th>
                        <td>
                            <table width="88%"  cellspacing="0" class="table_form">
                                <tr>
                                    <th width="100">建筑类别：</th>
                                    <td><input type="text" name="data[attr][jzlb]" value="<?php echo $detail['attr']['jzlb']; ?>" class="input-text" size="20" /></td>
                                    <th width="100">装修情况：</th>
                                    <td><input type="text" name="data[attr][zxqk]" value="<?php echo $detail['attr']['zxqk']; ?>" class="input-text"  size="20" /></td>
                                    <th width="100">产　　权：</th>
                                    <td><input type="text" name="data[attr][chanquan]" value="<?php echo $detail['attr']['chanquan']; ?>" class="input-text"  size="20" /></td>
                                </tr>
                                <tr>
                                    <th width="100">户　　数：</th>
                                    <td><input type="text" name="data[attr][hushu]" value="<?php echo $detail['attr']['hushu']; ?>" class="input-text" size="20" /></td>
                                    <th width="100">容 积 率：</th>
                                    <td><input type="text" name="data[attr][rjl]" value="<?php echo $detail['attr']['rjl']; ?>" class="input-text" size="20" /></td>
                                    <th width="100">开 发 商：</th>
                                    <td><input type="text" name="data[attr][kfs]" value="<?php echo $detail['attr']['kfs']; ?>" class="input-text" size="20" /></td>
                                </tr>
                                <tr>
                                    <th width="100">绿 化 率：</th>
                                    <td><input type="text" name="data[attr][lhl]" value="<?php echo $detail['attr']['lhl']; ?>" class="input-text"  size="20" /></td>
                                    <th width="100">物业公司：</th>
                                    <td><input type="text" name="data[attr][wygs]" value="<?php echo $detail['attr']['wygs']; ?>" class="input-text" size="20" /></td>
                                    <th width="100">车    位：</th>
                                    <td><input type="text" name="data[attr][chewei]" value="<?php echo $detail['attr']['chewei']; ?>" class="input-text" size="20" /></td>
                                </tr>
                                <tr>
                                    <th width="100">物 业 费：</th>
                                    <td><input type="text" name="data[attr][wuyefee]" value="<?php echo $detail['attr']['wuyefee']; ?>" class="input-text"  size="20" /></td>
                                    <th width="100">楼盘朝向：</th>
                                    <td><input type="text" name="data[attr][loupanzhaoxiang]" value="<?php echo $detail['attr']['loupanzhaoxiang']; ?>" class="input-text" size="20" /></td>
                                    <th width="100">物业类型：</th>
                                    <td><input type="text" name="data[attr][wylx]" value="<?php echo $detail['attr']['wylx']; ?>" class="input-text" size="20" /></td>
                                </tr>
                                <tr>
                                    <th width="100">道路交通：</th>
                                    <td colspan="5"><textarea name="data[attr][daolujiaotong]" style="width: 780px;height: 66px;"> <?php echo $detail['attr']['daolujiaotong']; ?></textarea></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <th>配套信息 :</th>
                        <td>
                            <table width="88%"  cellspacing="0" class="table_form">
                                <tr>
                                    <th style="width: 100px;">学校：</th>
                                    <td><textarea name="data[peitao][xuexiao]" style="width: 780px;height: 66px;"><?php echo $detail['peitao']['xuexiao']; ?></textarea></td>
                                </tr>
                                <tr>
                                    <th>购物：</th>
                                    <td><textarea name="data[peitao][gouwu]" style="width: 780px;height: 66px;"><?php echo $detail['peitao']['gouwu']; ?></textarea></td>
                                </tr>
                                <tr>
                                    <th>医院：</th>
                                    <td><textarea name="data[peitao][yiyuan]" style="width: 780px;height: 66px;"><?php echo $detail['peitao']['yiyuan']; ?></textarea></td>
                                </tr>
                                <tr>
                                    <th>生活：</th>
                                    <td><textarea name="data[peitao][shenghuo]" style="width: 780px;height: 66px;"><?php echo $detail['peitao']['shenghuo']; ?></textarea></td>
                                </tr>
                                <tr>
                                    <th>娱乐：</th>
                                    <td><textarea name="data[peitao][yule]" style="width: 780px;height: 66px;"><?php echo $detail['peitao']['yule']; ?></textarea></td>
                                </tr>
                                <tr>
                                    <th>餐饮：</th>
                                    <td><textarea name="data[peitao][canyin]" style="width: 780px;height: 66px;"><?php echo $detail['peitao']['canyin']; ?></textarea></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </div>

			<div class="content_list pad_10 hidden">
				<table width="100%" cellspacing="0" class="table_form">
					<tr>
						<th width="120">seo标题 :</th>
		 				<td><input type="text" name="data[seo_title]" id="seo_title" value="<?php echo $detail['seo_title']; ?>" class="input-text" size="60"></td>
					</tr>
					<tr>
						<th>seo关键词 :</th>
						<td><input type="text" name="data[seo_keys]" id="seo_keys" value="<?php echo $detail['seo_keys']; ?>" class="input-text" size="60"></td>
					</tr>
					<tr>
						<th>seo描述 :</th>
						<td><textarea name="data[seo_desc]" id="seo_desc" cols="80" rows="8"><?php echo $detail['seo_desc']; ?></textarea></td>
					</tr>
				</table>
			</div>
        </div>
        <input type="hidden" name="id" value="<?php echo $info['id']; ?>">
		<div class="mt10"><input type="submit" value="提交" id="dosubmit" name="dosubmit" class="btn btn_submit" style="margin:0 0 10px 100px;"><br /><br /><br /></div>
	</div>
</div>
</form>
<script src="__PUBLIC__/js/jquery.min.1.7.2.js"></script>
<script src="__JS__/manage.js"></script>
<script src="__JS__/admin.js"></script>
<script>
//初始化弹窗
(function (d) {
    d['okValue'] = '确定';
    d['cancelValue'] = '取消';
    d['title'] = '标题';
})($.dialog.defaults);
</script>
<script src="__PUBLIC__/js/plugins/formvalidator.js"></script>
<?php if(isset($list_table)): ?>
<script src="__PUBLIC__/js/plugins/listTable.js"></script>
<script>
$(function(){
	$('.J_tablelist').listTable();
});
</script>
<?php endif; ?>
<script src="__PUBLIC__/js/plugins/jquery.tools.min.js"></script>
<script src="__PUBLIC__/js/ueditor/ueditor.config.js"></script>
<script src="__PUBLIC__/js/ueditor/ueditor.all.min.js"></script>
<script src="__PUBLIC__/js/ueditor/lang/zh-cn/zh-cn.js"></script>
<script src="__PUBLIC__/js/ueditor/uploadImg.js"></script>
<script type="text/javascript">
    window.UEDITOR_HOME_URL='__PUBLIC__/js/ueditor/';
    window.onload=function(){
        window.UEDITOR_CONFIG.initialFrameWidth=880;
        window.UEDITOR_CONFIG.initialFrameHeight=500;
        UE.getEditor('info',{autoFloatEnabled:false});
        upmoreimg();
    }
</script>
<script type="text/javascript">
    var check_name_url = "<?php echo url('ajaxCheckTitle',['id'=>$info['id']]); ?>";
    $(function(){
        $('ul.J_tabs').tabs('div.J_panes > div');
        $('.J_cate_select').cate_select({type:'str'});
        $.formValidator.initConfig({formid:"info_form",autotip:true});
        $("#J_title").formValidator({onshow:"请填写小区名称",onfocus:"请填写小区名称"}).inputValidator({min:1,onerror:"请填写小区名称"}).ajaxValidator({
            type : "get",
            url : check_name_url,
            datatype : "json",
            async:'false',
            success : function(result){
                if(result.status == 0){
                    return false;
                }else{
                    return true;
                }
            },
            buttons: $("#dosubmit"),
            onerror : "该小区已经存在",
            onwait : "正在验证"
        }).defaultPassed();
        $("#J_cate_id").formValidator({onshow:"请选择区域",onfocus:"请选择区域"}).inputValidator({min:1,onerror:"请选择区域"}).defaultPassed();
        $(":checkbox[name^='estate_type']").formValidator({onshow:"请选择楼盘类型",onfocus:"你至少选择1项"}).inputValidator({min:1,max:10,onerror:"请至少选择一项"}).defaultPassed();

    });
   </script>
</body>
</html>